/* 按钮基础样式 */
.primary-btn, .secondary-btn, .delete-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    min-width: 90px;
    font-size: 1rem;
    white-space: nowrap;
}

.secondary-btn {
    background-color: #666;
}

.delete-btn {
    background-color: #dc3545;
}

/* 导航栏样式 */
.nav-bar {
    background-color: #333;
    padding: 1rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin-left: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
}

.nav-menu a:hover, .nav-menu a.active {
    background-color: #4CAF50;
    border-radius: 4px;
}

/* 商品管理特定样式 */
.container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-management {
    width: 100%;
}

.header-actions {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.header-actions h2 {
    margin: 0;
    font-size: 1.5rem;
}

/* 添加商品按钮位置样式 */
#addProductBtn {
    position: fixed;
    right: 20px;
    top: 80px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    width: auto;
    min-width: 90px;
    font-size: 1rem;
    white-space: nowrap;
}

.product-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.product-card {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.product-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.product-info > * {
    padding: 0 20px;
    white-space: nowrap;
}

.product-info h3 {
    margin: 0;
    width: 200px;
    font-size: 1.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-info div {
    margin: 0;
    width: 150px;
    font-size: 1rem;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
    white-space: nowrap;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* 订单状态样式 */
.status-pending {
    color: #f39c12;
}

.status-accepted {
    color: #27ae60;
}

.status-rejected {
    color: #c0392b;
}

/* 订单管理样式 */
.orders-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.order-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.order-card:hover {
    transform: translateY(-2px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.order-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.order-id {
    font-weight: bold;
    color: #333;
}

.buyer-info {
    color: #666;
    font-size: 0.9em;
}

.order-details {
    background: #f9f9f9;
    border-radius: 4px;
    padding: 15px;
    margin: 10px 0;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.order-item:last-child {
    border-bottom: none;
}

.item-name {
    flex: 2;
    font-weight: 500;
}

.item-price {
    flex: 1;
    text-align: center;
    color: #666;
}

.item-total {
    flex: 1;
    text-align: right;
    color: #e74c3c;
    font-weight: bold;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.order-time {
    color: #666;
    font-size: 0.9em;
}

.order-total {
    font-size: 1.2em;
    font-weight: bold;
    color: #e74c3c;
}

.order-actions {
    display: flex;
    gap: 10px;
}

.accept-btn, .reject-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

.accept-btn {
    background-color: #27ae60;
    color: white;
}

.accept-btn:hover {
    background-color: #219a52;
}

.reject-btn {
    background-color: #e74c3c;
    color: white;
}

.reject-btn:hover {
    background-color: #c0392b;
}

/* 状态样式 */
.status-pending {
    color: #f39c12;
    font-weight: bold;
}

.status-accepted {
    color: #27ae60;
    font-weight: bold;
}

.status-rejected {
    color: #c0392b;
    font-weight: bold;
}

/* 空状态样式 */
.empty-orders {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.empty-orders h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.5rem;
}

.empty-orders p {
    color: #666;
    font-size: 1.1rem;
}

/* 消息提示样式 */
.message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 4px;
    color: white;
    z-index: 1000;
    opacity: 0;
}

.message.success {
    background-color: #27ae60;
}

.message.error {
    background-color: #e74c3c;
} 